﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ui
{
    public class _tpanel : Panel
    {
        public bool transparent = false;

        protected override void OnPaintBackground(PaintEventArgs pevent)
        {
            if(!transparent)base.OnPaintBackground(pevent);
        }
        
        protected override CreateParams CreateParams
        {
            get
            {
                if (transparent)
                {
                    CreateParams cp = base.CreateParams;
                    cp.ExStyle |= 0x00000020; //WS_EX_TRANSPARENT
                    return cp;
                }
                else
                {
                    return base.CreateParams;
                }
            }
        }
    }
}
